Move ref writing to be transaction-based
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 5 Sep 2013 21:25:26 +0000 (17:25 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 7 Sep 2013 00:31:12 +0000 (20:31 -0400)
commit91d3b90c9fae22efb1f0154b39f8cc9420bdb665
treef17fbbb943468bbf1947263480549600d3299484
parentbd2948e9641b4179d53ee5763bd3effb1617ca5a
Move ref writing to be transaction-based

Rather than having separate write_ref calls, make clients start a
transaction, add some refs, and then commit it. While this doesn't
make it 100% atomic, it makes it easier for us to use an atomic
model, and it means we don't do as much I/O updating the summary
file and such.

https://bugzilla.gnome.org/show_bug.cgi?id=707644
13 files changed:
doc/ostree-sections.txt
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-private.h
src/libostree/ostree-repo-pull.c
src/libostree/ostree-repo-refs.c
src/libostree/ostree-repo.c
src/libostree/ostree-repo.h
src/ostree/ot-admin-cleanup.c
src/ostree/ot-builtin-commit.c
src/ostree/ot-builtin-pull-local.c
src/ostree/ot-builtin-refs.c
src/ostree/ot-builtin-reset.c
src/ostree/ot-builtin-write-refs.c